<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 用户收货地址 基类
 * @Entity
 * @Table(name="fa_addr", id={"id"})
 * @DDL("CREATE TABLE `fa_addr` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `addr` varchar(255) DEFAULT NULL COMMENT '详细地址',
  `name` varchar(15) DEFAULT NULL COMMENT '收货人',
  `uid` int(10) DEFAULT NULL COMMENT '用户id',
  `tel` varchar(15) DEFAULT NULL COMMENT '联系电话',
  `city` varchar(255) DEFAULT NULL COMMENT '城市',
  `status` enum('1','2') DEFAULT '1' COMMENT '默认地址:1=否,2=是',
  `time` int(10) DEFAULT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户收货地址'")
 * @property int $id 
 * @property string $addr 详细地址
 * @property string $name 收货人
 * @property int $uid 用户id
 * @property string $tel 联系电话
 * @property string $city 城市
 * @property string $status 默认地址:1=否,2=是
 * @property int $time 添加时间
 */
abstract class AddrBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 详细地址
     * addr
     * @Column(name="addr", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $addr;

    /**
     * 获取 addr - 详细地址
     *
     * @return string
     */ 
    public function getAddr()
    {
        return $this->addr;
    }

    /**
     * 赋值 addr - 详细地址
     * @param string $addr addr
     * @return static
     */ 
    public function setAddr($addr)
    {
        $this->addr = $addr;
        return $this;
    }

    /**
     * 收货人
     * name
     * @Column(name="name", type="varchar", length=15, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $name;

    /**
     * 获取 name - 收货人
     *
     * @return string
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * 赋值 name - 收货人
     * @param string $name name
     * @return static
     */ 
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * 用户id
     * uid
     * @Column(name="uid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $uid;

    /**
     * 获取 uid - 用户id
     *
     * @return int
     */ 
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * 赋值 uid - 用户id
     * @param int $uid uid
     * @return static
     */ 
    public function setUid($uid)
    {
        $this->uid = $uid;
        return $this;
    }

    /**
     * 联系电话
     * tel
     * @Column(name="tel", type="varchar", length=15, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $tel;

    /**
     * 获取 tel - 联系电话
     *
     * @return string
     */ 
    public function getTel()
    {
        return $this->tel;
    }

    /**
     * 赋值 tel - 联系电话
     * @param string $tel tel
     * @return static
     */ 
    public function setTel($tel)
    {
        $this->tel = $tel;
        return $this;
    }

    /**
     * 城市
     * city
     * @Column(name="city", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $city;

    /**
     * 获取 city - 城市
     *
     * @return string
     */ 
    public function getCity()
    {
        return $this->city;
    }

    /**
     * 赋值 city - 城市
     * @param string $city city
     * @return static
     */ 
    public function setCity($city)
    {
        $this->city = $city;
        return $this;
    }

    /**
     * 默认地址:1=否,2=是
     * status
     * @Column(name="status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $status;

    /**
     * 获取 status - 默认地址:1=否,2=是
     *
     * @return string
     */ 
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * 赋值 status - 默认地址:1=否,2=是
     * @param string $status status
     * @return static
     */ 
    public function setStatus($status)
    {
        $this->status = $status;
        return $this;
    }

    /**
     * 添加时间
     * time
     * @Column(name="time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $time;

    /**
     * 获取 time - 添加时间
     *
     * @return int
     */ 
    public function getTime()
    {
        return $this->time;
    }

    /**
     * 赋值 time - 添加时间
     * @param int $time time
     * @return static
     */ 
    public function setTime($time)
    {
        $this->time = $time;
        return $this;
    }

}
